import {render, h, ref} from "vue";
import ProgressVue from './progress'


const showProgress = (percentage, callback) => {
  const onCancel = () => {
    callback && callback()
  }
  const vnode = h(ProgressVue, {
    title: '上传视频到服务器',
    percentage: percentage,
    onCancel,
    onClose: () => {
      callback && callback()
    }
  })
  const wrap = document.createDocumentFragment()
  render(vnode, wrap)
  document.body.appendChild(wrap)
}

export {
  showProgress,
}
